{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# E"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Height: 465949\n",
      "Addr: 000000000000000000dbe4595fe0083117359bf4a61a3e0f2442a75449658349\n"
     ]
    }
   ],
   "source": [
    "#block400000\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "dff=pd.read_csv(r'E:\\scrapy\\fortest400000\\block400000.csv',chunksize=1000000,encoding='utf-8')\n",
    "for ch in dff:\n",
    "    i=0\n",
    "print('Height:',int(ch.loc[ch.index[-1],'Height']))\n",
    "print('Addr:',ch.loc[ch.index[-1],'Addr'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dff=pd.read_csv(r'E:\\scrapy\\fortest400000\\block400000.csv')\n",
    "print(dff.head(2))\n",
    "dff.drop([0],axis=0,inplace=True)\n",
    "dff.index=np.arange(0,len(dff),1)\n",
    "dff.to_csv(r'E:\\scrapy\\fortest400000\\block400000.csv',index=False)\n",
    "dff=pd.read_csv(r'E:\\scrapy\\fortest400000\\block400000.csv')\n",
    "dff.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Height: 387090\n",
      "Addr: 000000000000000003889d3b76d9ec8d22d1cdac8fbe0d5bd208ae05d198d4e4\n"
     ]
    }
   ],
   "source": [
    "#blcok\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "dff=pd.read_csv(r'E:\\scrapy\\fortest\\block.csv',chunksize=1000000,encoding='utf-8')\n",
    "for ch in dff:\n",
    "    i=0\n",
    "print('Height:',int(ch.loc[ch.index[-1],'Height']))\n",
    "print('Addr:',ch.loc[ch.index[-1],'Addr'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dff=pd.read_csv(r'E:\\scrapy\\fortest\\block.csv')\n",
    "print(dff.head(2))\n",
    "dff.drop([0],axis=0,inplace=True)\n",
    "dff.index=np.arange(0,len(dff),1)\n",
    "dff.to_csv(r'E:\\scrapy\\fortest\\block.csv',index=False)\n",
    "dff=pd.read_csv(r'E:\\scrapy\\fortest\\block.csv')\n",
    "dff.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Addr</th>\n",
       "      <th>Height</th>\n",
       "      <th>Input</th>\n",
       "      <th>Output</th>\n",
       "      <th>Sum</th>\n",
       "      <th>Time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>000000000000000003889d3b76d9ec8d22d1cdac8fbe0d...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                Addr  Height  Input  Output  \\\n",
       "0  000000000000000003889d3b76d9ec8d22d1cdac8fbe0d...     NaN    NaN     NaN   \n",
       "\n",
       "   Sum  Time  \n",
       "0  NaN   NaN  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd \n",
    "import numpy as np\n",
    "mu=pd.read_csv(r'E:\\scrapy\\muban.csv')\n",
    "mu.loc[0,'Addr']='000000000000000003889d3b76d9ec8d22d1cdac8fbe0d5bd208ae05d198d4e4'\n",
    "mu"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "mu.to_csv(r'E:\\muban.csv',index=False)#'E:\\scrapy\\muban.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'000000000000000003889d3b76d9ec8d22d1cdac8fbe0d5bd208ae05d198d4e4'"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mu.loc[0,'Addr']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# F"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#block400000\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "dff=pd.read_csv(r'F:\\fortest400000\\block400000.csv',chunksize=1000000,encoding='utf-8')\n",
    "for ch in dff:\n",
    "    i=0\n",
    "print('Height:',int(ch.loc[ch.index[-1],'Height']))\n",
    "print('Addr:',ch.loc[ch.index[-1],'Addr'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "dff=pd.read_csv(r'F:\\fortest400000\\block400000.csv')\n",
    "print(dff.head(2))\n",
    "dff.drop([0],axis=0,inplace=True)\n",
    "dff.index=np.arange(0,len(dff),1)\n",
    "dff.to_csv(r'F:\\fortest400000\\block400000.csv',index=False)\n",
    "dff=pd.read_csv(r'F:\\fortest400000\\block400000.csv')\n",
    "dff.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#block\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "dff=pd.read_csv(r'F:\\fortest\\block.csv',chunksize=1000000,encoding='utf-8')\n",
    "for ch in dff:\n",
    "    i=0\n",
    "print('Height:',int(ch.loc[ch.index[-1],'Height']))\n",
    "print('Addr:',ch.loc[ch.index[-1],'Addr'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "dff=pd.read_csv(r'F:\\fortest\\block.csv')\n",
    "print(dff.head(2))\n",
    "dff.drop([0],axis=0,inplace=True)\n",
    "dff.index=np.arange(0,len(dff),1)\n",
    "dff.to_csv(r'F:\\fortest\\block.csv',index=False)\n",
    "dff=pd.read_csv(r'F:\\fortest\\block.csv')\n",
    "dff.head(3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# D"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Height: 453467\n",
      "Addr: 000000000000000000a63c6496d7396f94b835a527a50c037f3069c9da6b2585\n"
     ]
    }
   ],
   "source": [
    "#block400000\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "dff=pd.read_csv(r'D:\\fortest400000\\block400000.csv',chunksize=1000000,encoding='utf-8')\n",
    "for ch in dff:\n",
    "    i=0\n",
    "print('Height:',int(ch.loc[ch.index[-1],'Height']))\n",
    "print('Addr:',ch.loc[ch.index[-1],'Addr'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "dff=pd.read_csv(r'D:\\fortest400000\\block400000.csv')\n",
    "print(dff.head(2))\n",
    "dff.drop([0],axis=0,inplace=True)\n",
    "dff.index=np.arange(0,len(dff),1)\n",
    "dff.to_csv(r'D:\\fortest400000\\block400000.csv',index=False)\n",
    "dff=pd.read_csv(r'D:\\fortest400000\\block400000.csv')\n",
    "dff.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Height: 349134\n",
      "Addr: 0000000000000000038e4ba204540a2a520283dc0b3cd6c6d3d83e886aa7ce3e\n"
     ]
    }
   ],
   "source": [
    "#block\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "dff=pd.read_csv(r'D:\\fortest\\block.csv',chunksize=1000000,encoding='utf-8')\n",
    "for ch in dff:\n",
    "    i=0\n",
    "print('Height:',int(ch.loc[ch.index[-1],'Height']))\n",
    "print('Addr:',ch.loc[ch.index[-1],'Addr'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "dff=pd.read_csv(r'D:\\fortest\\block.csv')\n",
    "print(dff.head(2))\n",
    "dff.drop([0],axis=0,inplace=True)\n",
    "dff.index=np.arange(0,len(dff),1)\n",
    "dff.to_csv(r'D:\\fortest\\block.csv',index=False)\n",
    "dff=pd.read_csv(r'D:\\fortest\\block.csv')\n",
    "dff.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
